#coding=utf-8
#Created on 2011-06-14
#@author: butter


from django_jinja import library

from common.utils import tool, html

register = library.Library()


@register.filter()
def mobile_safe(value):
    u'''
    function: 将显示的手机安全隐藏掉中间四位数字，如 13948594859显示成139****4859
    
    mobile - 手机号码
    '''
    return tool.mobile_safe(value)

@register.filter()
def lazyload(value):
    u'''
    function: 图片添加懒加载

    '''
    return html.lazy(value)


